<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 200px;
      height: 30px;
    }
  </style>
</head>

<body>
  <h3>标题1</h3>

  <div class="box">123</div>
  <div class="box">abc</div>
  <p id="nav">导航栏</p>
  <ul class="nav">
    <li>首页</li>
    <li>地图</li>
    <li>音乐</li>
    <li>游戏</li>
  </ul>
  <script>
    // 1. 获取匹配的第一个元素
    // h3 div p li
  const a = document.querySelector('h3')
  const b= document.querySelector('div')
  const c= document.querySelector('p')
  const d= document.querySelector('li')
console.log(a);
console.log(b);
console.log(c);
console.log(d);
  
   
    
    // 2. 选择所有的小li
   
   
    

    // 3.遍历获取li具体元素
    

  
  </script>
</body>

</html>